package edu.gdut.thesissys.vo;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Adjust entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "adjust", catalog = "gdutmis")
public class Adjust extends BaseVo implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1301873177612289912L;
	private Integer exchangeId;
	private Teacher teacherByTeacherIdRequest;
	private Student student;
	private PaperTitle paperTitleByTitleIdAfter;
	private Teacher teacherByTeacherIdResponse;
	private PaperTitle paperTitleByTitleIdBefore;
	private String adjustCause;
	private Date adjustDate;
	private String adjustState;
	private String adjustResult;

	// Constructors

	/** default constructor */
	public Adjust() {
	}

	/** minimal constructor */
	public Adjust(Student student) {
		this.student = student;
	}

	/** full constructor */
	public Adjust(Teacher teacherByTeacherIdRequest, Student student,
			PaperTitle paperTitleByTitleIdAfter,
			Teacher teacherByTeacherIdResponse,
			PaperTitle paperTitleByTitleIdBefore, String adjustCause,
			Date adjustDate, String adjustState, String adjustResult) {
		this.teacherByTeacherIdRequest = teacherByTeacherIdRequest;
		this.student = student;
		this.paperTitleByTitleIdAfter = paperTitleByTitleIdAfter;
		this.teacherByTeacherIdResponse = teacherByTeacherIdResponse;
		this.paperTitleByTitleIdBefore = paperTitleByTitleIdBefore;
		this.adjustCause = adjustCause;
		this.adjustDate = adjustDate;
		this.adjustState = adjustState;
		this.adjustResult = adjustResult;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "exchange_id", unique = true, nullable = false)
	public Integer getExchangeId() {
		return this.exchangeId;
	}

	public void setExchangeId(Integer exchangeId) {
		this.exchangeId = exchangeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "teacher_id_request")
	public Teacher getTeacherByTeacherIdRequest() {
		return this.teacherByTeacherIdRequest;
	}

	public void setTeacherByTeacherIdRequest(Teacher teacherByTeacherIdRequest) {
		this.teacherByTeacherIdRequest = teacherByTeacherIdRequest;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "student_id_request", nullable = false)
	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "title_id_after")
	public PaperTitle getPaperTitleByTitleIdAfter() {
		return this.paperTitleByTitleIdAfter;
	}

	public void setPaperTitleByTitleIdAfter(PaperTitle paperTitleByTitleIdAfter) {
		this.paperTitleByTitleIdAfter = paperTitleByTitleIdAfter;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "teacher_id_response")
	public Teacher getTeacherByTeacherIdResponse() {
		return this.teacherByTeacherIdResponse;
	}

	public void setTeacherByTeacherIdResponse(Teacher teacherByTeacherIdResponse) {
		this.teacherByTeacherIdResponse = teacherByTeacherIdResponse;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "title_id_before")
	public PaperTitle getPaperTitleByTitleIdBefore() {
		return this.paperTitleByTitleIdBefore;
	}

	public void setPaperTitleByTitleIdBefore(
			PaperTitle paperTitleByTitleIdBefore) {
		this.paperTitleByTitleIdBefore = paperTitleByTitleIdBefore;
	}

	@Column(name = "adjust_cause", length = 200)
	public String getAdjustCause() {
		return this.adjustCause;
	}

	public void setAdjustCause(String adjustCause) {
		this.adjustCause = adjustCause;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "adjust_date", length = 10)
	public Date getAdjustDate() {
		return this.adjustDate;
	}

	public void setAdjustDate(Date adjustDate) {
		this.adjustDate = adjustDate;
	}

	@Column(name = "adjust_state", length = 1)
	public String getAdjustState() {
		return this.adjustState;
	}

	public void setAdjustState(String adjustState) {
		this.adjustState = adjustState;
	}

	@Column(name = "adjust_result", length = 2)
	public String getAdjustResult() {
		return this.adjustResult;
	}

	public void setAdjustResult(String adjustResult) {
		this.adjustResult = adjustResult;
	}

}